Skip to content

Add tests for MCP and MEMORY context source types - #163

Open
harshvardhan60792 wants to merge 2 commits into
rajfirke:mainfrom
harshvardhan60792:fix/20-add-tests-for-mcp-and-memory-context-sou
Open

Add tests for MCP and MEMORY context source types#163
harshvardhan60792 wants to merge 2 commits into
rajfirke:mainfrom
harshvardhan60792:fix/20-add-tests-for-mcp-and-memory-context-sou

Conversation

@harshvardhan60792

Copy link
Copy Markdown
Contributor

Fixes #20

Added test coverage for ContextSource.MCP and ContextSource.MEMORY in test_models.py (source parsing) and test_trail.py (logging, query filtering, summary counting, and JSON export).

Testing: Added unit tests in test_models.py and test_trail.py; verified with pytest (131 passed) and ruff.


What does this PR do?

Checklist

  • Tests added/updated for the change
  • ruff check src/ tests/ passes
  • ruff format --check src/ tests/ passes
  • mypy src/provena/ passes
  • pytest passes with no failures
  • CHANGELOG.md updated (if user-facing change)

Related Issues

Added test coverage for ContextSource.MCP and ContextSource.MEMORY in test_models.py (source parsing) and test_trail.py (logging, query filtering, summary counting, and JSON export).
@rajfirke

rajfirke commented Sep 3, 2026

Copy link
Copy Markdown
Owner

Thanks @harshvardhan60792 — the tests cover the right cases and CI failures are just a ruff format issue, not test failures. Two lines in test_trail.py exceed the line-length limit:

r2 = memory_trail.log("explicit enum mcp", source=ContextSource.MCP, source_name="github")
r2 = memory_trail.log("working memory", source=ContextSource.MEMORY, source_name="working")

Run ruff format tests/test_trail.py locally — it'll split those two lines automatically and CI will go green. Everything else looks good to go.

@harshvardhan60792

Copy link
Copy Markdown
Contributor Author

Thanks for the pointer @rajfirke! Ran
uff format\ on \ ests/test_trail.py\ to split those two lines and pushed the update. CI should be green now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add tests for MCP and MEMORY context source types

2 participants